import { use, useState } from "react"
import SubCom from "../../components/demo/SubCom"

function Demo() { 
    const [user]=useState({name:"张三",age:18})
    const [msg,setMsg]=useState("hello world")
    const sendData=(data:string)=>{

        setMsg(data);
      
    }
    return (
        <div>
             组件传值
             <div>接收到的数据{msg}</div>
             <SubCom sendData={sendData} user={user} id={88888}></SubCom>
        </div>
    )
}
export default Demo